package com.iss.umservice.manager;

import java.util.List;

import com.iss.umservice.bean.AnnouncementBean;
import com.iss.umservice.bean.AnnouncementNoReadQueryBean;
import com.iss.umservice.bean.AnnouncementReadBean;
import com.iss.umservice.bean.AnnouncementReadedQueryBean;
import com.iss.umservice.bean.AnnouncementReadedResultBean;
import com.iss.umservice.bean.AnnouncementReadedResultSummaryBean;
import com.iss.umservice.bean.QueryAnnouncementBean;

/**
 * 通知公告信息
 * 
 * @author luzi
 * 
 */
public interface AnnouncementManager {
	/**
	 * 新增通知公告信息
	 * 
	 * @param newAnn
	 *            待增加的信息
	 * @return 新增后分配的编号
	 */
	int addAnnouncement(AnnouncementBean newAnn);

	/**
	 * 修改通知公告信息
	 * 
	 * @param ann
	 *            待修改信息
	 */
	void modAnnouncement(AnnouncementBean ann);

	/**
	 * 删除通知公告信息
	 * 
	 * @param ann
	 */
	void delAnnouncement(AnnouncementBean comp);

	/**
	 * 根据条件查询通知公告信息
	 * 
	 * @param condition
	 * @param offset
	 * @param row
	 * @return
	 */
	List<QueryAnnouncementBean> queryAnnouncements(
			QueryAnnouncementBean condition, int offset, int row);

	/**
	 * 获得通知公告数目
	 * 
	 * @param condition
	 * @return
	 */
	int countAnnouncement(QueryAnnouncementBean condition);

	/**
	 * 获得某个通知公告的信息
	 * 
	 * @param condition
	 * @return
	 */
	AnnouncementBean getAnnouncement(AnnouncementBean condition);

	/**
	 * 获得所有通知公告的信息
	 * 
	 * @return
	 */
	List<QueryAnnouncementBean> allAnnouncement();

	/**
	 * 废弃通知公告
	 * 即将状态修改为删除，但不会真正删除
	 * @param ids
	 */
	void discardAnnouncement(int[] ids);
	
	List<AnnouncementNoReadQueryBean> queryNoReadAnn(String currUserId,
			int offset, int row);
	int countNoReadAnn(String currUserId);

	List<AnnouncementReadedQueryBean> queryReadedAnn(String currUserId,
			int offset, int row);
	int countReadedAnn(String currUserId);
	
	void readedAnn(int annId,String currUserId,String receiptMsg,Integer receiptSelectionId);
	
	AnnouncementReadBean getReadedAnn(int annId,String currUserId);
	
	List<AnnouncementReadedResultBean> queryReadedAnnResult(AnnouncementReadedResultBean bean,int offset, int row);
	int countReadedAnnResult(AnnouncementReadedResultBean bean);
	
	List<AnnouncementReadedResultSummaryBean> queryReadedAnnResultSummary(AnnouncementReadedResultSummaryBean bean);
}
